1. Field of the Invention
This invention generally relates to camera-based scanners and, more particularly, to a system and method for using prior knowledge to build models and to improve the estimation of undefined camera focal lengths.
2. Description of the Related Art
The number of imaging devices used to capture mixed-content documents (text, image, and graphics) for business workflows has increased with the adoption of low-cost high-quality cameras and smart phones in the workplace. Unlike conventional flatbed or sheet-fed document scanners, the imaging characteristics of these new devices are not well known. It is often desirable to profile the imaging characteristics of these new capture systems to optimize the image quality of the captured document content and to dewarp the perspective distortions introduced due to the camera's optics and the user's point-of-view. The imaging device itself may embed some of the characteristics within the image meta-data for the captured document. The Japan Electronics and Information Technology Industries Association has published the EXIF standards for specifying image file formations for digital still cameras. The specifications for device meta-data include such tags as (10F Hex) for camera Make and (110 Hex) for camera Model (which can be used to identify the device used to capture the image) and (920A Hex) for lens focal length. However the tag (920A Hex) is often not useful to recover imaging geometry because the sensor size is not encoded in header. A new tag (A405 Hex) is intended to address this issue by specifying the camera's focal length for the captured image as a 35 millimeter (mm) equivalent. This new tag can be used to recover the camera's perspective geometry; unfortunately, it is often missing from many camera manufacturers' implementation of the standard. This has led to the development of many techniques to calibrate imaging sensors.
FIG. 1A depicts a perspective distorted document, FIG. 1B illustrates an affine correction that preserves the right angles but not the aspect ratio of document, and FIG. 1C illustrates a metric rectification that preserves relative distances. Document images captured using a digital still camera often contain perspective distortion due to off-axis capturing conditions. This distortion can impede the reader's comprehension of the content and lower optical character recognition (OCR) performance considerably. Distortion effects can be minimized by means of a geometric transformation. In environments where little is known about the captured documents or the camera, multiple solutions may exist due to the degenerate conditions. Only one solution corresponds to the metric rectification that preserves the angles and relative distances between content on the captured document. Solutions that don't preserve the relative distances deviate from document scans produced by traditional scanning methods.
Parent application Ser. No. 13/275,256, provides a good background on the mathematics and issues surrounding the recovery of document and camera properties from unknown scenes. In the section entitled “Geometric Rectification Quality Measures,” several tests and heuristic conditions are proposed to determine unstable estimates of the camera focal length and the document normal. The parameters may either be undefined (e.g. single vanishing point) or unreliable (a far vanishing point approaching infinity). In Ser. No. 13/275,256 several methods are introduced to handle these conditions. In some cases the rectification is rejected, and in others it is modified to be a non-metric rectification using defaults calculated from a typical camera. In both instances the rectification results are less than ideal.
Similarly, it is common to resort to non-metric rectifications or to simplify the solutions by utilizing cameras from a known viewing position or a document with known dimensions and/or using a camera with known perspective geometry. Simplifying the problem by eliminating some of the unknowns enables the methods to produce metric rectifications even under difficult conditions. However, the characteristics needed for simplification are not always known.
It would be advantageous if the problem of determining an unknown scanned image focal length could be simplified with the use of accumulated prior estimates.